package com.my.chapter12;

public class practice15 {
    private static Switch sw = new Switch();
    public static void f() throws OnOffException1,OnOffException2{
        throw new RuntimeException();
    }

    public static void main(String[] args) {
        try {
            sw.on();
            f();
        }catch (OnOffException1 e){
            e.printStackTrace();
        }catch (OnOffException2 e){
            e.printStackTrace();
        }finally{
            sw.off();
        }
    }
}
